#ifndef __GWQY_TASK_H__
#define __GWQY_TASK_H__
#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "tim.h"
#include "stepper.h"
  
  
  
enum Conveyor_State
{   
  Stop_= 0,                             
  Forward2Start,                               
  Forward2Stop,                                
  Back2Start,
  Back2Stop,
  
};  
  
enum Reciprocator_State
{                           
  Push = 1,                               
  Pull,                                 
};  

enum R2Z_State
{                           
  R2Z_Finsh = 0,                               
  R2Z_Start,                                 
}; 



class UserControl{

  public:
  uint8_t DeviceNumber;
  uint8_t Conveyor_State;
  uint8_t Reciprocator_State;
  uint8_t R2Z_State;
  
  UserControl(){
  DeviceNumber = 0;
  Conveyor_State = Brake;
  Reciprocator_State = Brake;
  R2Z_State = R2Z_Finsh;
  
  }
  
  void GWQY_Task(void);
  void GWQY_Task_Conveyor(uint8_t Conveyor_State);
  void GWQY_Task_Reciprocator(uint8_t DeviceNumber,uint8_t Reciprocator_State);
  void GWQY_Task_RTZ(uint8_t DeviceNumber);
};


extern UserControl UserControlObj;



#ifdef __cplusplus
}
#endif
#endif /*__GWQY_TASK_H__ */


